1. Field of Invention
The present invention relates to a barcode recognition method, and more particularly to a barcode recognition method of directly outputting a recognition result to an application program by simulating keystrokes.
2. Related Art
In the prior art, there are two types of hardware for recognizing barcode. One is a barcode reader, which is dedicated to barcode recognition, connected to a terminal host. The terminal host supports one or more pre-determined barcode protocols. By using hardware architecture to perform image processing, binarization, and barcode comparison, the barcode reader transmits the barcode recognition result to the terminal host. The terminal host executes an application program, and receives and processes the barcode recognition result, so as to execute the function of the application program. The other type is a data processing apparatus equipped with an image capture module, for example, a desktop computer, a laptop computer, a personal digital assistant (PDA), a portable navigation device (PND) or a Smart Phone. The aforementioned data processing apparatus is not dedicated solely to barcode recognition. Through installing a barcode recognition program, the data processing apparatus can equipped with barcode recognition function.
Referring to FIG. 1, the process of performing barcode recognition by the data processing apparatus is to execute the barcode recognition program in foreground execution after loading and initializing the barcode recognition program (Step 1). The barcode recognition program is independent from other application programs. Therefore, a user needs a thread management program, such as a Task Manager program, to switch between the barcode recognition program and the other application programs.
After the barcode recognition program is launched, the data processing apparatus captures image frames through the image capture module. When capturing the image frames, the user has to confirm that the image capture module is aligned with the barcode through the display device at first, and then manually triggers the image capturing of barcode, such that the barcode recognition program obtains the image frame to be recognized. Alternatively, the user designates that the barcode recognition program loads an image file containing a barcode from the data storage device (Step 2). Next, the data processing apparatus starts to perform image processing, binarization, and comparison interpretation for deriving the barcode information (Step 3), and displays a recognition result on the display screen (Step 4).
As described above, the barcode recognition program is independent from other application programs. The user has to copy the recognition result in the barcode recognition program at first, switch between the barcode recognition program and the other application programs, and finally transfer the recognition result to other application programs through copy-and-paste operation. Such a copy-and-paste process is quite inconvenient to operate, particularly for handheld data processing apparatus like PDA, PND or Smart Phone, switching between different foreground programs is a difficult operation procedure. Alternatively, after storing the recognition result (Step 5), the recognition result in the internal database is transformed into a storage file, and then the storage file is exported to other application programs. Therefore, on the handheld data processing apparatus, the barcode recognition program simply has the barcode recognition function for the user to acquire the barcode information without further applications. When a large amount of barcodes are required be recognized, a software development kit provided by the barcode recognition system or an application program interface has to be used to call an external tool program to be integrated with the barcode recognition program, so as to enhance the use of the barcode recognition program for certain demands. However, the aforementioned method has a high cost and relatively high difficulty.